package acwing;

import java.io.*;
import java.util.Arrays;

public class ac848 {
    static final int N = 100010;
    static int n, m;
    static int[] q = new int[N];
    static int[] d = new int[N];
    static int[] h = new int[N], e = new int[N], ne = new int[N];
    static int idx;
    static StreamTokenizer cin = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
    static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));

    static int nextInt() throws IOException {
        cin.nextToken();
        return (int) cin.nval;
    }

    static void add(int a, int b) {
        e[idx] = b;
        ne[idx] = h[a];
        h[a] = idx ++ ;
    }

    static boolean topSort() {
        int hh = 0, tt = -1;
        for (int i = 1; i <= n; i ++ ) {
            if (d[i] == 0) {
                q[ ++ tt] = i;
            }
        }

        while (hh <= tt) {
            int t = q[hh ++ ];
            for (int i = h[t]; i != -1; i = ne[i]) {
                int j = e[i];
                if (-- d[j] == 0) q[ ++ tt] = j;
            }
        }
        return tt == n - 1;
    }

    public static void main(String[] args) throws IOException {
        n = nextInt();
        m = nextInt();
        Arrays.fill(h, -1);
        while (m -- > 0) {
            int a, b;
            a = nextInt();
            b = nextInt();
            add(a, b);
            d[b] ++ ;
        }
        if (!topSort()) out.println("-1");
        else {
            for (int i = 0; i < n; i ++ ) {
                out.print(q[i] + " ");
            }
            out.println();
        }
        out.close();
    }
}